﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="UpdateGenericInfo.aspx.cs" Inherits="Content_Admin_UpdateGenericInfo" StylesheetTheme="ContentMS" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>无标题页</title>
</head>
<body style="margin:0;" bgcolor="#D8E7FA">
    <form id="form1" runat="server">
    <table class="TableCss" bgcolor="#D8E7FA" cellSpacing="0" cellpadding="0" width="100%" border="1">
		<tr>
			<td background="../../Images/HT_top.jpg" colspan="2" height="25">
				<table height="25" cellpadding="0" cellspacing="0" border="0">
					<tr>
						<td height="25" valign="middle" align="center">&nbsp;&nbsp;&nbsp;<img src="../../Images/HT_top_ioc.GIF" /></td>
						<td><font class="AdminTitle">&nbsp;&nbsp;<b>修改内容的信息</b></font></td>
					</tr>
				</table>
			</td>
		</tr>		
		<tr>
			<td width="150" align="right">
				标题：</td>
			<td><asp:TextBox ID="Name" runat="server" Width="300px"></asp:TextBox><asp:RequiredFieldValidator
					ID="RequiredFieldValidator1" runat="server" ControlToValidate="Name" ErrorMessage="标题不能为空。"></asp:RequiredFieldValidator></td>
		</tr>		
		<tr>
			<td width="150" align="right" valign="top"><asp:Label ID="lbDesn" runat="server" Text="详细内容"></asp:Label>：</td>
			<td><asp:TextBox ID="tbDesn" runat="server" Width="400px" Height="250px" TextMode="MultiLine"></asp:TextBox></td>
		</tr>		
		<tr>
			<td width="150" align="right"></td>
			<td><asp:Button ID="UpdateBtn" runat="server" CssClass="ButtonCss" Text="修改选择的信息" CommandName="update" OnCommand="Btn_Command" Width="145px" CausesValidation="False" Enabled="False"  />
			<asp:CheckBox ID="cbDocument" runat="server" Text="添加或修改文章附件或图片" AutoPostBack="True" OnCheckedChanged="cbDocument_CheckedChanged" Enabled="False" /></td>
		</tr>
		<tr>
			<td width="150" align="right" valign="top"></td>
			<td>
				<asp:GridView ID="DocView" runat="server" SkinID="gridviewskin" Caption="附件或图片列表" DataKeyNames="ID" OnRowDeleting="DocView_RowDeleting" OnRowCommand="DocView_RowCommand" OnRowDataBound="DocView_RowDataBound">
					<Columns>						
						<asp:TemplateField HeaderText="标题">
							<ItemTemplate>
								<a href='../../<%#Eval("Url") %>'><%#Eval("Name") %></a>
							</ItemTemplate>
							<ItemStyle HorizontalAlign="Left" />
							<HeaderStyle Width="40%" />							
						</asp:TemplateField>						
						<asp:TemplateField  HeaderText="类型">
							<ItemTemplate>
								<asp:Image ID="Attachment" runat="server" ImageUrl='<%# FormatContentdpFlag((short)Eval("dpFlag")) %>' />
							</ItemTemplate>
							<ItemStyle HorizontalAlign="Center" />
							<HeaderStyle Width="10%" HorizontalAlign="Center" />
						</asp:TemplateField>						
						<asp:TemplateField HeaderText="操作">
							<ItemTemplate>
								<asp:ImageButton ID="DeleteBtn" runat="server" CommandName="delete" CausesValidation="false" ImageUrl="~/Images/delete.gif" AlternateText="删除附件或图片" CommandArgument='<%# Eval("ID") %>' />&nbsp;&nbsp;&nbsp;
								</ItemTemplate>
							<ItemStyle HorizontalAlign="Center" />
							<HeaderStyle Width="10%" HorizontalAlign="Center" />
						</asp:TemplateField>					
					</Columns>
				</asp:GridView>				
		    </td>
		</tr>
		<tr><td width="150">&nbsp;</td><td>
			<asp:Panel runat="server" ID="pFile" Width="100%" Visible="False">
				<asp:RadioButtonList ID="rbFileType" RepeatDirection="Horizontal" runat="server" CssClass="GbText">
					<asp:ListItem Text="附件类型" Value="1" Selected="True"></asp:ListItem>
					<asp:ListItem Text="图片类型" Value="2"></asp:ListItem>
				</asp:RadioButtonList>
				<asp:TextBox ID="tbDocName" runat="server" Width="300">默认名称</asp:TextBox>(附件或图片名称)<asp:RequiredFieldValidator
					ID="rfDocName" runat="server" ControlToValidate="tbDocName" ErrorMessage="名称不能为空。"></asp:RequiredFieldValidator><br />
				<asp:FileUpload ID="fuFile" runat="server" Width="400px" CssClass="ButtonCss" />				
				<asp:Button ID="btnUpload" runat="server" SkinID="DefaultButtonSkin" Text="上载文件" OnClick="btnUpload_Click" />
			</asp:Panel>
			</td></tr>
		<tr><td width="150">&nbsp;</td>
			<td align="left" colspan="2" style="height: 22px">
			  <asp:Button ID="ReturnBtn" runat="server" CssClass="ButtonCss" Text="返回" CausesValidation="False" CommandName="return" OnCommand="Btn_Command" Width="80px" SkinID="DefaultButtonSkin"  /></td>
		</tr>
	</table>
    </form>
</body>
</html>
